﻿using System;
using System.Data;

namespace DreamCube.Framework.DataAccess.Basic
{
    /// <summary>
    /// 表示数据库一条记录
    /// </summary>
    public class DBRecord
    {
        #region "字段"

        /// <summary>
        /// 数据行对象
        /// </summary>
        private DataRow innerRow = null;

        #endregion

        #region "方法"

        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="row"></param>
        public DBRecord(DataRow row)
        {
            this.innerRow = row;
        }

        /// <summary>
        /// 保存到数据库中
        /// </summary>
        /// <param name="db">可以指定保存到哪个数据库中</param>
        /// <returns></returns>
        public Boolean SaveToDB(Database db = null)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// 根据列名获取列值
        /// </summary>
        /// <param name="fieldName"></param>
        /// <returns></returns>
        public Object GetValue(String fieldName)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// 根据列序号获取列值
        /// </summary>
        /// <param name="rowIndex"></param>
        /// <returns></returns>
        public Object GetValue(Int32 rowIndex)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
